import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Mytest {

    public static void main(String[] args) {
        long time1 = Calendar.getInstance().getTime().getTime();
        long time = time1 + 300000;
        //System.out.println(DateFormatUtils.format(time1, "yyyy-MM-dd HH:mm:ss SSS"));
        //System.out.println(DateFormatUtils.format(time, "yyyy-MM-dd HH:mm:ss SSS"));
        long time2 = Calendar.getInstance().getTime().getTime();
        System.out.println(time2-time1);
        long time3 = Calendar.getInstance().getTime().getTime();
        System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS").format(time3));
        System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS").format(time));
        long time4 = Calendar.getInstance().getTime().getTime();
        System.out.println(time4-time3);
        long time5 = Calendar.getInstance().getTime().getTime();
        //System.out.println(FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss SSS").format(time5));
        //System.out.println(FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss SSS").format(time));
        long time6 = Calendar.getInstance().getTime().getTime();
        System.out.println(time6-time5);
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS");
        long time7 = Calendar.getInstance().getTime().getTime();
        System.out.println(simpleDateFormat.format(time7));
        System.out.println(simpleDateFormat.format(time));
        long time8 = Calendar.getInstance().getTime().getTime();
        System.out.println(time8-time7);
    }
}
